package cn.qing.service.Impl;

import cn.qing.mapper.SysLogMapper;
import cn.qing.pojo.SysLog;
import cn.qing.service.SysLogService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysLogServiceImpl implements SysLogService {

    @Autowired
    SysLogMapper sysLogMapper;

    /**
     * 保存日志
     * @param sysLog
     */
    @Override
    public void save(SysLog sysLog) {
        sysLogMapper.save(sysLog);
    }

    //    查找
    @Override
    public List<SysLog> findAll(Integer page, Integer size) {
        PageHelper.startPage(page,size);
        return sysLogMapper.findAll();

    }
}
